<?php
class Apps_Plugin_Upload_Image extends Apps_Plugin_Upload_File {
	protected $_extension = array('jpg','jpeg','png','gif');
    protected $_mimetype  = array('image');

    protected $_imageSize   = null; // array('minwidth'  => ?,
                                  //       'maxwidth'  => ?,
                                  //       'minheight' => ?,
                                  //       'maxheight' => ?)

    protected $_autoResize = false;
    protected $_width = null;
    protected $_height = null;

    public function setImageSize($size) {
    	$this->_imageSize = $size;
    	return $this;
    }

    public function setWidth($width) {
        $this->_width = $width;
        return $this;
    }

    public function setHeight($height) {
        $this->_height = $height;
        return $this;
    }

    protected function _initUploader() {
        parent::_initUploader();

        return $this->_uploader;
    }
    /*
    protected function _initUploader() {
    	parent::_initUploader();
    	if($this->_autoResize) {
    		// @todo ...
    	} else {
    		if($this->_imageSize) {
    	       $this->_uploader->addValidator('ImageSize', false, $this->_imageSize);
    		}
    	}

    	return $this->_uploader;
    }
    */
}